class ViewbooksController < ApplicationController
  def index
    @categories = Category.all    
    @book = Book.find(params[:book_id])
    @book.view += 1
    @book.save!      
    @user = current_user
    @hot_books = Book.search_hot_book()    
  end
  
  def show
    @book = Book.find(params[:book_id])
    redirect_to viewbooks_index_path(:book_id => params[:book_id])
  end
end
